if (!localStorage.currentUser) {
    location = "login.html";
}
var currentUser = JSON.parse(localStorage.currentUser);